package com.tth.learn.addproperties.java1;

/**
 * @Author tth
 * @Date 2022/12/29 16:31
 */
@MyAnnotattion(value = "hi")
public class Person extends Creature<String> implements Comparable<String>,MyInterface{
    private static final long serialVersionUID = 1126444831518922095L;
    private String name;
    int age;
    public int id;

    public Person() {

    }

    @MyAnnotattion(value = "private Person")
    private Person(String name) {
        this.name = name;
    }

    Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @MyAnnotattion
    private String showNation(String nation) {
        System.out.println("我的国籍是"+nation);
        return nation;
    }

    public String display(String interests) throws NullPointerException, ClassNotFoundException{
        return interests;
    }


    @Override
    public void showInfo() {
        System.out.println("我是一个人");
    }

    private static void showDesc() {
        System.out.println("我是一个可爱的人");
    }

    @Override
    public int compareTo(String o) {
        return 0;
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", id=" + id +
                ", weight=" + weight +
                '}';
    }
}
